package com.eastfair.projectcore.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.annotation.annotation.vo.VoInfo;
import com.eastfair.projectcore.enumeration.MenuAffiliationEnum;
import com.eastfair.projectcore.enumeration.MenuMenuTypeEnum;
import com.eastfair.projectcore.enumeration.MenuSceneEnum;
import com.eastfair.vo.VoGroupClass;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 菜单
 * </p>
 *
 * @author ligang
 * @since 2021-07-22
 */
@Data
@ApiModel(value = "Menu", description = "菜单")
public class MenuVO implements Serializable {

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Long id;

    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单名称")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String name;

    /**
     * 菜单名称（英文）
     */
    @ApiModelProperty(value = "菜单名称（英文）")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String enName;

    /**
     * code码
     */
    @ApiModelProperty(value = "code码")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String code;

    /**
     * 范围  比如（首页导航、底部菜单等等），根据terminalType联动查询	FALSE	FALSE
     */
    @ApiModelProperty(value = "范围  比如（首页导航、底部菜单等等），根据terminalType联动查询	FALSE	FALSE")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String region;

    /**
     * 连接类型，比如：h5外链，展品详情，展商详情，原生页面等等，下拉项包括业务接口和字典接口
     */
    @ApiModelProperty(value = "连接类型，比如：h5外链，展品详情，展商详情，原生页面等等，下拉项包括业务接口和字典接口")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String linkType;

    /**
     * 值例如：www.baidu  / 内联地址 /展商id等等
     */
    @ApiModelProperty(value = "值例如：www.baidu  / 内联地址 /展商id等等")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String link;


    /**
     * icon
     */
    @ApiModelProperty(value = "icon")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String icon;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Integer sequence;

    /**
     * 父级id
     */
    @ApiModelProperty(value = "父级id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Long parentId;




    /**
     * 菜单类型 #{catalog:目录;menu:菜单;button:按钮}
     */
    @ApiModelProperty(value = "菜单类型 #{catalog:目录;menu:菜单;button:按钮}")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private MenuMenuTypeEnum menuType;




    /**
     * 路由参数
     */
    @ApiModelProperty(value = "路由参数")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String linkParam;

    /**
     * 组件路径,前端资源路径，给前端用的
     */
    @ApiModelProperty(value = "组件路径,前端资源路径，给前端用的")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String moduleUrl;

    /**
     * 权限字符
     */
    @ApiModelProperty(value = "权限字符")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String permission;


    /**
     * 是否外链(默认1：是 0:否)
     */
    @ApiModelProperty(value = "是否外链(默认1：是 0:否)")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Integer isOutLink;

    /**
     * 是否显示(默认1：是 0:否)
     */
    @ApiModelProperty(value = "是否显示(默认1：是 0:否)")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Integer isShow;


    /**
     * 菜单第几层
     */
    @ApiModelProperty(value = "菜单层数")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Integer level;


    /**
     * 是否生效(默认1：可用 0:不可用)
     */
    @ApiModelProperty(value = "是否生效(默认1：可用 0:不可用)")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Integer isEnabled;

    /**
     * 是否删除(默认0：未删除 1:已删除)
     */
    @ApiModelProperty(value = "是否删除(默认0：未删除 1:已删除)")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Integer isDeleted;


    /**
     * 子菜单信息
     */
    @ApiModelProperty(value = "子菜单信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private List<MenuVO> childVoList;


    /**
     * 子菜单id信息
     */
    @ApiModelProperty(value = "子菜单id信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private List<Long> childIdList;


    /**
     * 是否是叶子节点 ，当type为菜单时，是叶子节点
     */
    @ApiModelProperty(value = "是否是叶子节点")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private Boolean isLeaf;

    /**
     * 归属系统#{BOOKING:场馆;TRANSPORT:主运;BUILDER:搭建商}
     */
    @ApiModelProperty(value = "归属系统#{BOOKING:场馆;TRANSPORT:主运;BUILDER:搭建商}")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private MenuAffiliationEnum affiliation;
    /**
     * 场景#{MANAGE:管理菜单;WORK:工作台菜单;APP:前端菜单;}
     */
    @ApiModelProperty(value = "场景#{MANAGE:管理菜单;WORK:工作台菜单;APP:前端菜单;}")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private MenuSceneEnum scene;

//    /**
//     * 按钮权限集合
//     */
//    @ApiModelProperty(value = "按钮权限集合")
//    @JsonInclude(JsonInclude.Include.NON_NULL)
//    @VoInfo(groups = {VoGroupClass.all.class})
//    private List<String> buttonPermissionList;


    /**
     * 接口权限
     */
    @ApiModelProperty(value = "接口权限")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {VoGroupClass.all.class})
    private String interfaceUrl;



}
